//BC100 有序序列合并
#include <stdio.h>
#include<stdlib.h>

int main()
{
    int n = 0;
    int m = 0;
    int index = 0;
    int cre = 0;
    scanf("%d %d", &n, &m);
     int* arr1 = (int*)malloc(sizeof(int) * n);
    int* arr2 = (int*)malloc(sizeof(int) * m);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &arr1[i]);
    }
    for (int j = 0; j < m; j++)
    {
        scanf("%d", &arr2[j]);
    }
    while (index < n && cre < m)
    {
        if (arr1[index] < arr2[cre])
        {
            printf("%d ", arr1[index++]);
        }
        else
        {
            printf("%d ", arr2[cre++]);
        }
    }
    if (index == n && cre < m)
        for (; cre < m; cre++)
            printf("%d ", arr2[cre]);
    else
        for (; index < n; index++)
            printf("%d ", arr1[index]);

    free(arr1);
    arr1=NULL;
    free(arr2);
    arr2=NULL;
    return 0;
}


//BC117 小乐乐走台阶
#include <stdio.h>

int main()
{   
    int n=0;
    scanf("%d",&n);
    int a=1;
    int b=2;
    int flag=0;
            int c=a+b;
    if(n==1)
    {
        printf("%d\n",a);
    }
    if(n==2)
    {
        printf("%d\n",b);
    }
    while(n>2)
    {
        c=a+b;
        a=b;
        b=c;
        n--;
        flag=1;
    }
    if(flag==1)
    {
        printf("%d",c);
    }


    return 0;
}



//BC38 变种水仙花
#include <stdio.h>

int main()
{
    for(int i=10000;i<99999;i++)
    {
         int sum=0;
        for(int j=10;j<=100000;j*=10)
        {
            int n=i/j;
            int m=i%j;
            sum+=n*m;
        }
        if(sum==i)
        {
            printf("%d ",i);
        }
    }

    return 0;
}


//BC51 三角形判断
#include <stdio.h>

int main() {
    int a = 0;
    int b = 0;
    int c = 0;
    while (~scanf("%d %d %d", &a, &b, &c)) {
        if (a + c <= b || a + b <= c || b + c <= a) 
        {
            printf("Not a triangle!\n");
        }
        else if (a == b && a == c && b == c) 
        {
            printf("Equilateral triangle!\n");
        } 
        else if ((a != b) && (a != c) && (b != c)) 
        {
            printf("Ordinary triangle!\n");
        }
        else
         {
            printf("Isosceles triangle!\n");
        }
    }
    return 0;
}